package implementation.shared;


import com.thoughtworks.xstream.XStream;

public class CSerializer implements ISerializer{
	
	private XStream xstream;
	
	public CSerializer() {
		xstream = new XStream();
		//xstream.omitField(definedIn, fieldName);
	}

	@Override
	public IPacket deserialize(String str) {
		IPacket ret = (IPacket) xstream.fromXML(str);
		return ret;
	}

	@Override
	public String serialize(IPacket packet) {
		
		return xstream.toXML(packet);
	}

	
}
